﻿Public Class Adder
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btn_add_Click(sender As Object, e As EventArgs) Handles btn_add.Click
        lbl_result.Text = "The result is: " & tb_first.Text & " + " & tb_second.Text & " = " & add(tb_first.Text, tb_second.Text)
    End Sub

    Private Function add(ByVal firstNum As String, ByVal secondNum As String) As Single
        Dim sum As Single
        sum = CSng(firstNum) + CSng(secondNum)
        Return sum
    End Function

End Class